home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 February / CHIPCD_02_2002.iso / Internet / Macromedia ColdFusion Server 5 / coldfusion-50-win-us.exe / data1.cab / Examples / CFDOCS / snippets / cfprocresult.cfm < prev    next >
Encoding:
Text File  |  2001-06-13  |  1.5 KB  |  64 lines

  1. <!--- CFPROCRESULT Example --->
  2. <HTML>
  3. <HEAD>
  4. <TITLE>
  5. CFPROCRESULT Example
  6. </TITLE>
  7. </HEAD>
  8.  
  9. <BASEFONT FACE="Arial, Helvetica" SIZE=2>
  10. <BODY  bgcolor="#FFFFD5">
  11.  
  12. <H3>CFPROCRESULT Function</H3>
  13.  
  14. <P>The following example executes a Sybase stored procedure 
  15. that returns three result sets, two of which we want. The
  16. stored procedure returns the status code and one output
  17. parameter, which we display. We use named notation
  18. for the parameters.
  19. <!--- CFSTOREDPROC tag 
  20. <CFSTOREDPROC PROCEDURE="foo_proc"
  21.     DATASOURCE="MY_SYBASE_TEST"    USERNAME="sa"
  22.     PASSWORD=""    DBSERVER="scup"    DBNAME="pubs2"
  23.     RETURNCODE="YES" DEBUG>  --->
  24. <!--- CFPROCRESULT tags 
  25. <CFPROCRESULT NAME = RS1>
  26. <CFPROCRESULT NAME = RS3 RESULTSET = 3> --->
  27. <!---  CFPROCPARAM tags 
  28. <CFPROCPARAM TYPE="IN"
  29.     CFSQLTYPE=CF_SQL_INTEGER
  30.         VALUE="1"    DBVARNAME=@param1>
  31.         
  32. <CFPROCPARAM TYPE="OUT"    CFSQLTYPE=CF_SQL_DATE
  33.     CFVARNAME=FOO    DBVARNAME=@param2> --->
  34. <!--- Close the CFSTOREDPROC tag 
  35. </CFSTOREDPROC>  --->
  36. <!---
  37. <CFOUTPUT>
  38. The output param value: '#foo#'
  39. <br>
  40. </CFOUTPUT>
  41. <h3>The Results Information</h3>
  42. <CFOUTPUT QUERY = RS1>#NAME#,#DATE_COL#
  43. <br>
  44. </CFOUTPUT>
  45. <p>
  46. <CFOUTPUT>
  47. <hr>
  48. <p>Record Count: #RS1.RecordCount# >p>Columns: #RS1.ColumnList#
  49. <hr>
  50. </CFOUTPUT> 
  51. <CFOUTPUT QUERY=RS3>#col1#,#col2#,#col3#
  52. <br>
  53. </CFOUTPUT>
  54. <p>
  55. <CFOUTPUT>
  56. <hr>
  57. <p>Record Count: #RS3.RecordCount# <p>Columns: #RS3.ColumnList#
  58. <hr>
  59. The return code for the stored procedure is: '#CFSTOREDPROC.STATUSCODE#'<br>
  60. </CFOUTPUT>
  61. --->
  62.  
  63. </BODY>
  64. </HTML>